<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>工程合同详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../resources/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../resources/css/style.css" media="all">
    <style>
        body{height: 100%;}
        ._MOVE{height: 100%;}
        .details li{width: 50%;float: left;}
        .layui-table thead th{text-align: left;}
        .engineering_c{margin-top: 10px;}
        .engineering_c li{width: 100%;}
        .shenheBtn{float: right; margin-top: 10px;}
        .s_hide{margin-top: 10px;}
        .layui-select-title input{width: 100%;margin-bottom: 10px;margin-top: 10px;}
        .layui-input{width: 100%;}
        .layui-form-pane .layui-form-label{width: 100px;}
        .layui-form-select{width: 100%;}
        .imgs img{width: 100px;height: 100px;}
        html{height: 100%;background-color: #FFF;}
        .MOVE_main{padding: 15px;background-color: #FFF;}
        .MOVE_main p{line-height: 25px;width: 100%;}
        .jiange{border-bottom: 3px solid #DBE6FC;margin-bottom: 20px;}

        /*移动端弹框*/
        .MOVE_mainL{width: 100px; display: inline-block;}
        .MOVE_mask{position: fixed;top: 0;bottom: 0;left: 0;right: 0; background-color: rgba(0,0,0,.3); display: none;}
        .MOVE_maskON{height: 200px;background-color: #FFF;position: absolute;bottom: 0;width: 100%; text-align: center;
           }
        .MOVE_foot{height: 50px;background-color: #253147;position: absolute;bottom: 0;width: 100%;text-align: right;}
        .close{background-color: #253147;top:-16px;}
    </style>
</head>
<body>

<div class="_MOVE">
    <div class="MOVE_title">
        <div class="site-tree-mobile layui-show houtui" onclick="history.back(-1);">
            <i class="layui-icon">&#xe603;</i>
        </div>
        <span class="zhanwei"></span>
        <p class="MOVE_biaoti">合同进度查询详情</p>
        <span class="shousuo"><a href="###" style="color: #FFFFFF;">编辑</a></span>

    </div>
    <script id="demos" type="text/html">
        {{#  layui.each(d.data[0], function(index, item){ }}
            {{# console.log(item.cc_Code)}}
            <p><span class="MOVE_mainL">合同编号:</span><span class="MOVE_mainR">{{item.cc_UUID}}</span></p>
            <p><span class="MOVE_mainL">项目名称:</span><span class="MOVE_mainR">{{item.eppName}}</span></p>
            <p><span class="MOVE_mainL">起止点:</span><span class="MOVE_mainR">{{item.eppStaEnd}}</span></p>
            <p><span class="MOVE_mainL">建设单位:</span><span class="MOVE_mainR">{{item.compJs}}</span></p>
            <p><span class="MOVE_mainL">施工单位:</span><span class="MOVE_mainR">{{item.compName1}}</span></p>
            <p><span class="MOVE_mainL">项目负责人:</span><span class="MOVE_mainR">{{item.compPerson1}}</span></p>
            <p class="jiange"><span class="MOVE_mainL">联系方式:</span><span class="MOVE_mainR">{{item.compTel1}}</span></p>
            <p><span class="MOVE_mainL">计划开工日期:</span><span class="MOVE_mainR">{{item.preStaTime}}</span></p>
            <p><span class="MOVE_mainL">计划竣工日期:</span><span class="MOVE_mainR">{{item.preEndTime}}</span></p>
            <p><span class="MOVE_mainL">委托设计单位:</span><span class="MOVE_mainR">{{item.compName0}}</span></p>
            <p><span class="MOVE_mainL">项目负责人:</span><span class="MOVE_mainR">{{item.compPerson0}}</span></p>
            <p class="jiange"><span class="MOVE_mainL">联系方式:</span><span class="MOVE_mainR">{{item.compTel0}}</span></p>
            <p><span class="MOVE_mainL">决算方式:</span><span class="MOVE_mainR">{{item.cc_CostType}}</span></p>
            <p><span class="MOVE_mainL">材料供应:</span><span class="MOVE_mainR">{{item
    .cc_Material}}</span></p>
        {{#  }); }}

        <p><span class="MOVE_mainL gaikuo">工程概括:</span><span class="MOVE_mainR">
            {{#  layui.each(d.data[1], function(index, items){ }}
                {{items.cc_key}}:{{items.cc_value}}
            {{#  }); }}
        </span></p>

        <p><span class="MOVE_mainL feiyong">工程费用:</span><span class="MOVE_mainR">
             {{#  layui.each(d.data[2], function(index, itemss){ }}
                    {{itemss.cc_cname}}:{{itemss.cc_cprice}}:{{itemss.cc_cnum}}:{{itemss.cc_cbit}}
              {{#  }); }}
        </span></p>


    </script>


    <div class="MOVE_main" id="MOVE_main">


    </div>

    <div class="MOVE_mask">
        <div class="MOVE_maskON">
            <form class="layui-form" action="">
                <div class="layui-inline"  style=" margin-top: 25px;">
                    <label class="layui-form-label">接收人:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="cc_recperson" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-inline">
                    <label class="layui-form-label">验证日期:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="cc_rectime" id="date" lay-verify="datetime|required" placeholder="yyyy-MM-dd HH:mm:ss" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="close">×</div>

                <div class="MOVE_foot">
                    <button class="layui-btn layui-btn-sm tijiao" style="background-color: #F5A623;height: 100%;width: 100px;font-size: 20px;" lay-submit lay-filter="_subm">确定</button>
                </div>

            </form>
        </div>

    </div>

</div>




<script src="../../../resources/layui/layui.js" charset="utf-8"></script>
<script src="../../../resources/js/style.js"></script>
<script src="../../../resources/js/api.js"></script>
<script>

    //详情页 暂无数据  接的假接口   渲染需注意;

    layui.use(['form', 'layedit', 'laydate','table','laytpl'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,table=layui.table
            ,laytpl=layui.laytpl
            ,laydate = layui.laydate;
        var transmit=new Object();      //接受数据传递  发送ajax需调用

        //日期
        laydate.render({
            elem: '#date'
            ,type: 'datetime'
        });

        if(sessionStorage.stear=='detail'){
            $('.shenpiSee').hide();
            $('.shent').hide();
        }else{
            $('.shenpiSee').show();
            $('.shent').show();
        }
        $('.close').click(function () {             //关闭弹框
            $('.MOVE_mask').hide();
        })
        //提交监听
        form.on('submit(_subm)',function (data) {
            console.log(data.field)

//
            data.field.cc_uuid=sessionStorage.MOVE_ID;
            data.field.p=getCookie('yanzheng');
            formAlertAjax('/api/contract/editBuilProcess.do',data.field,'.tijiao');


            return false;
        })



        console.log(sessionStorage.MOVE_ID)

        ajaxs('/api/contract/loadContractDetails.do','post',{'uuid':sessionStorage.MOVE_ID,'p':getCookie('yanzheng')},function (data) {

            var datas=data;
            console.log(datas)
            if(data.code=='0'){

                var getTpl = demos.innerHTML                        //调用模板  进行渲染
                    ,view = document.getElementById('MOVE_main');
                laytpl(getTpl).render(datas, function(html){
                    view.innerHTML = html;
                });
            }else{
                layer.msg('获取失败 请重新尝试')

            }
        })

        $('.shousuo').click(function () {
            $('.MOVE_mask').show();
        })



    })

</script>
</body>
</html>